

using System;
using System.Collections.Generic;
using System.Web.Http;

namespace WebApp.Controllers
{
    [RoutePrefix("api")]
    public class EchoController : ApiController
    {
        private static List<String> meesages = new List<String>();

        [Route("echo/")]
        [HttpGet]
        public IHttpActionResult Get(String message)
        {
            if (!meesages.Contains(message))
            {
                meesages.Add(message);
            }
            return Ok(meesages);
        }


        [Route("echo")]
        [HttpGet]
        public IHttpActionResult Get()
        {
            return Ok(meesages);
        }
    }
}